# A name for the project
project(plasma_engine_dbus)

# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
 
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
   ${CMAKE_SOURCE_DIR}
   ${CMAKE_SOURCE_DIR}/../lib
   ${CMAKE_BINARY_DIR}
   ${KDE4_INCLUDES}
   )

# We add our source code here
set(dbus_engine_SRCS dbusengine.cpp scanthread.cpp ../lib/dbusappletItem.cpp)

# Now make sure all files get to the right place
kde4_add_plugin(plasma_engine_dbus ${dbus_engine_SRCS})
#link_directories(${KDE4_LIB_DIR})
#link_directories(${PLASMA_ENGINE_DBUS_BINARY_DIR/lib}) 
#add_library(plasma_engine_dbus SHARED dbusappletlib )

target_link_libraries(plasma_engine_dbus
                      ${KDE4_KDECORE_LIBS}
                      ${KDE4_PLASMA_LIBS}
                      ${QT_QTXML_LIBRARY}
                      )

install(TARGETS plasma_engine_dbus
        DESTINATION ${PLUGIN_INSTALL_DIR})

install(FILES plasma-engine-dbus.desktop
        DESTINATION ${SERVICES_INSTALL_DIR})

